﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Data.Linq.Mapping;

namespace Safal.IncidentTracker.Domain.Entities
{
    [Table(Name = "Incident")]
    public class Incident
    {
        [Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync=AutoSync.OnInsert)]
        public int Id { get; set; }
        
        [Required(ErrorMessage = "Please enter a incident Title")]
        [Column] public string Title { get; set; }

        [Required(ErrorMessage = "Please enter the casualty's Name")]
        [Column] public string Casualty { get; set; }

        [Required(ErrorMessage = "Please enter the incident Description")]
        [Column] public string Description { get; set; }

        [Required(ErrorMessage = "Please enter the type of Injury ( ex Contusion, Fracture )")]
        [Column] public string InjuryType { get; set; }

        [Required(ErrorMessage = "Please enter the body part injured ( ex arm, shoulder )")]
        [Column] public string InjuryLocation { get; set; }

        [ScaffoldColumn(false)]
        [Column] public DateTime DateOfIncident { get; set; }
    }
}